import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import enUsTrans from "./modules/en"
import zhCnTrans from "./modules/zh"

i18n
  .use(initReactI18next)
  .init({
    debug: true,
    fallbackLng: 'en',
    interpolation: {
      escapeValue: false, // not needed for react as it escapes by default
    },
    // language resources
    resources: {
        en: {
			translation: enUsTrans
		},
		zh: {
			translation: zhCnTrans
		}
    }
  });

export default i18n;